package com.flot.yazb.base.rxjava.fld;

import java.util.HashMap;
import java.util.Map;

/**

 new RxMap()
 .put("page","2")
 .put("offset","10")
 .build()

 * Created by fengdongfei on 2017/8/28.
 */

public class RxMap<T,R>{

    Map<T,R> map;

    public static <T,R> RxMap<T,R> newInstance(){
        return new RxMap<>();
    }

    public RxMap() {
        this.map = new HashMap<>();
    }

    public RxMap(Map<T,R> map) {
        this.map = map;
    }

    public RxMap<T,R> put(T t, R r){
        map.put(t,r);
        return this;
    }

    public Map<T,R> build(){
        return map;
    }
}